package me.sealer.ssm.service.impl;

import me.sealer.ssm.mapper.UserRoleMapper;
import me.sealer.ssm.model.UserRole;
import me.sealer.ssm.service.UserRoleService;
import org.springframework.stereotype.Service;

/**
 * 功能描述： $ UserRoleImpl
 *
 * @author sealer
 * @email 1178884049@qq.com
 * @date 2019年11月26日 15时04分43秒
 */
@Service
public class UserRoleServiceImpl implements UserRoleService {
    private final UserRoleMapper userRoleMapper;

    public UserRoleServiceImpl(UserRoleMapper userRoleMapper) {
        this.userRoleMapper = userRoleMapper;
    }

    @Override
    public boolean insert(UserRole userRole) {
        userRoleMapper.insert(userRole);
        return true;
    }

    @Override
    public void deleteByUserId(Integer id) {
        userRoleMapper.deleteByUserId(id);
    }
}
